<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="play">过山车</div>
    <div class="play">旋转木马</div>
    <div class="play">摩天轮</div>
    <div class="play">观影院</div>
</body>
</html>
<script>
    var firstpro=document.querySelector('.play')
    console.log(firstpro);
    var allpro=document.querySelectorAll('.play');
    console.log(allpro);
</script>